package com.hzqy.persistence.dao.industry;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.industry.C2BascHistryVo;
import com.hzqy.web.vo.industry.ZjDataOpenInterfaceDatasVo;
import com.hzqy.web.vo.industry.ZjDataOpenInterfaceVo;
import com.hzqy.web.vo.industry.ZjZheJiangServiceVo;
@Repository
public class IndustryDao extends PersistenceDao<C2BascHistryVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());

	public List<C2BascHistryVo> selectC2BascHistroyByContentId(int f_cc_id) {
		return getSqlSession().selectList(this.getNamespace() + "selectC2BascHistroyByContentId", f_cc_id);
	}
	
	public int selectZjDataOpenInterfaceCount(ZjDataOpenInterfaceVo zjDataOpenInterfaceVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectZjDataOpenInterfaceCount", zjDataOpenInterfaceVo);
	}
	
	public List<ZjDataOpenInterfaceVo> selectZjDataOpenInterfaceList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectZjDataOpenInterfaceList", map);
	}
	
	public int insertZjDataOpenInterface(ZjDataOpenInterfaceVo zjDataOpenInterfaceVo) {
		return getSqlSession().insert(this.getNamespace() + "insertZjDataOpenInterface", zjDataOpenInterfaceVo);
	}
	
	public int deleteZjDataOpenInterface(int f_zdoi_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteZjDataOpenInterface", f_zdoi_id);
	}
	
	public int updateZjDataOpenInterface(ZjDataOpenInterfaceVo zjDataOpenInterfaceVo) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "updateZjDataOpenInterface", zjDataOpenInterfaceVo);
	}
	
	public ZjDataOpenInterfaceVo selectZjDataOpenInterface(int f_zdoi_id) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectZjDataOpenInterface", f_zdoi_id);
	}
	
	public int selectZjDataOpenInterfaceDatasCount(ZjDataOpenInterfaceDatasVo zjDataOpenInterfaceDatasVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectZjDataOpenInterfaceDatasCount", zjDataOpenInterfaceDatasVo);
	}
	
	public List<ZjDataOpenInterfaceDatasVo> selectZjDataOpenInterfaceDatasList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectZjDataOpenInterfaceDatasList", map);
	}

	public Integer selectZjZheJiangServiceListCount(ZjZheJiangServiceVo zjZheJiangServiceVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectZjZheJiangServiceListCount", zjZheJiangServiceVo);
	}

	public List<ZjDataOpenInterfaceDatasVo> selectZjZheJiangServiceList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectZjZheJiangServiceList", map);
	}


	public int updateZjZheJiangService(ZjZheJiangServiceVo zjZheJiangServiceVo) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "updateZjZheJiangService", zjZheJiangServiceVo);
	}

	public int insertZjZheJiangService(ZjZheJiangServiceVo zjZheJiangServiceVo) {
		String namespace = this.getNamespace();
		return getSqlSession().insert(namespace + "insertZjZheJiangService", zjZheJiangServiceVo);
	}

	public ZjZheJiangServiceVo selectZjZheJiangServiceInfo(int f_zjbs_id) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectZjZheJiangServiceInfo", f_zjbs_id);
	}

	public int deleteZjZheJiangService(int f_zjbs_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteZjZheJiangService", f_zjbs_id);
	}
	
	public int selectZjDataOpenInterfaceDatasSize(ZjDataOpenInterfaceDatasVo zjDataOpenInterfaceDatasVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectZjDataOpenInterfaceDatasSize", zjDataOpenInterfaceDatasVo);
	}
	
	public int insertZJDataOpenInterfaceDatas(ZjDataOpenInterfaceDatasVo zjDataOpenInterfaceDatasVo) {
		return getSqlSession().insert(this.getNamespace() + "insertZJDataOpenInterfaceDatas", zjDataOpenInterfaceDatasVo);
	}
	
	public int updateZjDataOpenInterfaceLimitCount(ZjDataOpenInterfaceVo zjDataOpenInterfaceVo) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "updateZjDataOpenInterfaceLimitCount", zjDataOpenInterfaceVo);
	}
	
	public int deleteZJDataOpenInterfaceDatas(int f_zdoi_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteZJDataOpenInterfaceDatas", f_zdoi_id);
	}
	
	/**
	 * 批量添加接口数据
	 * @param zjDataOpenInterfaceDatasVoList
	 * @return
	 */
	public int batchInsertZJDataOpenInterfaceDatas(List<ZjDataOpenInterfaceDatasVo> zjDataOpenInterfaceDatasVoList) {
		return getSqlSession().insert(this.getNamespace() + "batchInsertZJDataOpenInterfaceDatas", zjDataOpenInterfaceDatasVoList);
	}
}

